package i_oStream.byteStream;

import java.io.UnsupportedEncodingException;

public class BianMa {
    public static void main(String[] args) throws UnsupportedEncodingException {
        //编码
        String str = "牛逼";
        byte[] bytes = str.getBytes("UTF-8");
        //解码
        String str1 = new String(bytes, "GBK");
        String str2 = new String(bytes, "UTF-8");
        System.out.println(str1);
        System.out.println(str2);
    }
}
